# -*- coding: utf-8 -*-
'''
Created on 12/ott/2009

@author: sax
'''
from django.db import models
from django.db.models.query import QuerySet, EmptyQuerySet, insert_query

class QuerySetMock(QuerySet):
    def __init__(self, model=None, query=None):
        self.model = model
        self.query = None
        self._result_cache = (ModelMock(), ModelMock() )
        self._iter = None
        self._sticky_filter = False
    
    def _as_sql(self):
        return "QuerySetMock"
    
class ManagerMock(models.Manager):
    def get_query_set(self):
        """Returns a new QuerySet object.  Subclasses can override this method
        to easily customize the behavior of the Manager.
        """
        return QuerySetMock(self.model)
    
class ModelMock(models.Model):
    char = models.CharField(max_length=10, default="char_field")
    int = models.IntegerField(default=100)
    fk = models.ForeignKey('self')
        
    objects = ManagerMock()
    
    def __init__(self, *args, **kwargs):        
        super(ModelMock, self).__init__(*args, **kwargs)
    
    def __unicode__(self):
        return "%s" % self.char
            
#    def __repr__(self):
#        return ""
#    def __str__(self):
#        return ""
    def __eq__(self, other):
        return ""
    
    def __ne__(self, other):
        return ""
    
#    def __hash__(self):
#        return ""
#    def __reduce__(self):
#        return ""
#    def _get_pk_val(self, meta=None):
#        return ""
#    def _set_pk_val(self, value):
#        return ""
#    def serializable_value(self, field_name):
#        return ""
#    def save(self, force_insert=False, force_update=False):
#        return ""
#    def save_base(self, raw=False, cls=None, origin=None, force_insert=False, force_update=False):
#        return ""
#    def _collect_sub_objects(self, seen_objs, parent=None, nullable=False):  
#        return ""      
#    def delete(self):
#        return ""
#    def _get_FIELD_display(self, field):
#        return ""
#    def _get_next_or_previous_by_FIELD(self, field, is_next, **kwargs):
#        return ""
#    def _get_next_or_previous_in_order(self, is_next):
#        return ""
#    def prepare_database_save(self, unused):
#        return ""
